on NUOVO_HANDLER
  setwindow topwindow()
  put GetSelected(long id of this cd) into SEL_CD -- verifica che esista un grafico selezionato
  if SEL_CD is empty then exit NUOVO_HANDLER
  put the script of SEL_CD into S1
  put the number of lines of S1 into L_S
  put empty into n_s
  repeat with a = 1 to L_S
    if char 1 to 13 of line a of S1 = "on mouseEnter" then
      put line 1 to a of S1 into S2
      put line a+1 to L_S of S1 into S3
      put S2&return&"CALCOLA_DIMENSIONI"&return&S3 into n_s
      exit repeat
    end if
  end repeat
  if n_s  empty then set the script of SEL_CD to n_s
end NUOVO_HANDLER